Filename | (eval 31)[/usr/share/perl5/JSON.pm:319] |
Statements | Executed 3 statements in 24µs |
Eval Invoked At | /usr/share/perl5/JSON.pm line 319 |
Sibling evals | 1, 2 |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 22µs | 72µs | BEGIN@3 | JSON::XS::Boolean::
0 | 0 | 0 | 0s | 0s | __ANON__[:13] | JSON::XS::Boolean::
0 | 0 | 0 | 0s | 0s | __ANON__[:4] | JSON::XS::Boolean::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | |||||
2 | package JSON::XS::Boolean; | ||||
3 | # spent 72µs (22+50) within JSON::XS::Boolean::BEGIN@3 which was called:
# once (22µs+50µs) by JSON::Boolean::_overrride_overload at line 14 | ||||
4 | '""' => sub { ${$_[0]} == 1 ? 'true' : 'false' }, | ||||
5 | 'eq' => sub { | ||||
6 | my ($obj, $op) = ref ($_[0]) ? ($_[0], $_[1]) : ($_[1], $_[0]); | ||||
7 | if ($op eq 'true' or $op eq 'false') { | ||||
8 | return "$obj" eq 'true' ? 'true' eq $op : 'false' eq $op; | ||||
9 | } | ||||
10 | else { | ||||
11 | return $obj ? 1 == $op : 0 == $op; | ||||
12 | } | ||||
13 | }, | ||||
14 | 3 | 24µs | 2 | 122µs | ); # spent 72µs making 1 call to JSON::XS::Boolean::BEGIN@3
# spent 50µs making 1 call to overload::import |
15 | |||||
16 | ; |